<?php
// +----------------------------------------------------------------------
// | 文章模型
// +----------------------------------------------------------------------
// | Author:  Eric <ieyangxiaoguo@126.com>
// +----------------------------------------------------------------------
// | Copyright ©2017  http://www.zzuyxg.top  All rights reserved.
// +----------------------------------------------------------------------
// | 2017年10月12日
// +----------------------------------------------------------------------
namespace app\common\model;

use think\Model;


class RequirementModel extends Model
{
  public function getAll(){
      return $this->all();
  }

    /**
     * 关联分类表
     */
    public function requirementType()
    {
        //一对一
        return $this->belongsTo('RequirementTypeModel', 'type');
    }




    /**
     * 关联用户表
     */
    public function teacher()
    {
        //一对一
        return $this->belongsTo('TeacherModel', 'issuer','id');
    }

    /**
     * 关联用户表
     */
    public function member()
    {
        //一对一
        return $this->belongsTo('MemberModel', 'issuer', 'id');
    }

}
